﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Optimization;
using HANS.Cache;
using HANS.WeChat;
using Senparc.Weixin.MP.Containers;

namespace WebApplication1
{
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.ResisterBundles(BundleTable.Bundles);
            CacheHelper.RegisterCacheMode(new AspnetCache(new CacheConfig()//设置缓存模式
            {
                Prefix = "HANS",
                Duration = 360,
                Expire = 360
            }));
            AccessTokenContainer.Register(WeChatBaseInfo.AppID, WeChatBaseInfo.AppSecret);
        }
        //BundleTable.EnableOptimizations = true;//是否启用优化   
    }
    
}
